package tedu.cn.boot431.mapper;

import org.apache.ibatis.annotations.*;
import tedu.cn.boot431.entity.Emp;

import java.util.List;

@Mapper
public interface EmpMapper {

    @Insert("insert into newemp values (null,#{name},#{job},#{sal})")
    void add(Emp emp);

    @Select("select * from newemp")
    List<Emp> select();

    @Update("update newemp set name=#{name},job=#{job},sal=#{sal} where id=#{id}")
    void update(Emp emp);

    @Delete("delete from newemp where id=#{id}")
    void delete(int id);
}
